working. Refactored classes into separate files. More files, but shorter.