changes from dans code merged
Merge pull request #6 from MarshallMcCoy/event_tests_and_refactor

changes from dans code merged