Minor math improvements.