Unit tested the bus

refactored bus, commands and events.