use python libs to simplify race average
remove unused variables
add tests
better testcase name
Merge pull request #1 from imcnally/better_race_average

use python libs to simplify race average