Fixed flip/unflip functions, added card click function, and check of how many filps