finished debugging lua and event handling stuff; woo