Added eventbus to sim and tests.
Added null-type safety by using optionals.
Fixed format and refactored event system.
Added event generation for reporting of consumption. Formatted code.