Third commit

* Fixed some variable scoping
* Added $debugOutput functionality
* Added 'c' key functionality to create new level