Refactor classes into separate files