Better ratio calculations. See #14