removed unused variable
creating KeyHandler object and changing onCtrlReleased from class to instance function
setWindow and setupView changed from class to instance functions