extract classes into separate files