Get rid of unused parameters.
Factor out dynamic rate generation into separate file.