Added error checking in card reading & extracted the extractor to a new class.