Merging files back to engine.

Added comments so I know what modules need extracting.
Started adding missing tests.