Outsourced some of the responsibility to the window class.
Window added to remove some responsibility from Main.cpp.