Pulled out classes into separate files.