Refactored file into separate files by class