Refactor usage of params