Update window.cpp

Cleanup and comment