* Moved all the debug stuff to a single class so that it's more obvious and easier to remove later.

*  More comments where needed. Added some stuff in the TODO as well.

* Minor restructuring in EngineCore for efficiency and clarity's sake.