Start reworking things
Fix a weird segfault
Start work on event processing