Refactored functions in Bowling.js file and updated spec tests in BowlingSpec.js file