Refactored percentage math