refactoring game service for code climate