Added the Card class, refactored almost every other class