refactored logging and event classes