reverted the main loop interval back to 500ms, was 1s just for testing
changed end of level scenario in moveInLevel to level.length so it is reusable, cleaned up code a bit as well