refactor classes to single file