Much improved rate function; documentation improvements/corrections