Factor out elo calculations