that has all the functionality, except it does not work yet (the stdin reading routine is missing).
broken, and event handling is not yet in the driver-specific files, but I will of course fix that later.