Refactored the code, added JSON parsing for levels, automatic level
loading etc.