Separated class definitions into separate files.
Cleaned up some system code.