Refactored score method by pulling out scoring logic into separate methods for strikes, spares and all other cases.