Tidied up handle-events and traverse (got TODOs in traverse though)

Removed some code that I'll re-write