wins and total grouped into a score class

Try block made into its own function.
gave constants names for readability.