added some handling for the end game, refactored init and touchBegan and more methods