Created card object and updated functions accordingly.  Lots of cleanup. Removed unused functions.