Spelling fix and refactoring player's slugging percentage calculation