Fixed ELO calculations & some refactoring.