General cleanups. Add a way to register multiple event handlers at once.