Misc. small improvements regarding event handlers
Move closest() to "selector" module, and use it for delegated event handlers. Fixed tests.
Import all modules in the same way