Remove util module, add event creation and triggering, remove some old/redundant in code checks, and greatly increase test coverage.