Add missing test coverage, refactor some tests

Added tests that went missing during the engine refactor.