added savegame, fixed a couple of bugs, removed some unused code