more cleanup on the 2D engine