various fixes, added Graphics::checkError and finally got the damn thing working