Move parameters to endpoint, code and test cleanup.