Added Keyboard support. Added code to support resizing window.