Semi-functional (whoo) event handling with decorators. Needs a cleanup though.