Huge refactor of the game and card code