Removed cardset and tweaked code slightly