Fixed some memory leaks in Window.cpp
Merge branch 'testing' into bugfix
Added debug code.
Removed debug code.
Merge branch 'bugfix' into testing