Changed ratio calculations to use diffs rather than absolute values