Ok, I made some changes, and it does the first part in a 0.1s now, and the second part in 7s. However the code looks very much like an impe[…]