Refactor to use internal params class