Added better error handeling
Moved elo algorithm core to function