Cleanup, remove some unneeded code, fix level generation