Fixed keyboard input behaviour (with some help)
Added a 'main' window, added patterns to blocks