Bugfixes, documentation, and a restructuring of the event system.