refactor classes into separate files