Refactoring for 50 line class limit.