Refactoring that params parsing code to move into another class