Refactoring: sepration of some classes into their own files. Compiled/tested on Linux and Windows.