Updated insert queries and added CardGroups table.