No blank line between JSHint text and function headers; made formatPercentage() more generic