Added Frame (not totally untested), added key-event-generator, refactored main