further keyevent handling, remove some cruft (freeimage)