Refactored methods to solve OCP issue.