Added a table for cards, other changes
Fixed merge conflict