Refactoring some systems into separate files.