First round of unit tests (engine)

100% coverage of engine code