cleaned up main function, fixed discrepancies between different versions, moved functions regarding playing cards to hand function