Refactor parameters to class