Moved engine files, minor refactoring.