Major revamp of the backend game logic