Refactor move class to file