Refactoring player slugging percentage calculation to use object oriented design; Code beautification