Move parameters logic to it's own class to keep controllers dry