Added some input handling to Window class.