Refactor the engine to a specs2-like structure