Almost fixed remaining bugs. Levels 17, 29 and 37 are still under investigation