Simplified some arithmetic.