Yay, all tests green. :)

Refactoring all done, but need new API wrappers and tests for ApplicationEvents.