Remove dead constants.
Change formatting.
Change to safe reads.
Change events to simplify callbacks.
Fix callback tests and close #11
Fix tests.