Moved the classes out to separate files.