Refactoring CardParser
adding card tests