Refactoring

Moved the engine agnostic parts under their own namespace.