Module to calculate rates based on the inputs provided, and tests for it.