Refactor bowling example