Move argument handling to separate class