Maze game bug fix

- Fixed crash on completing game
- More code cleanup