Re-implemented card client as restful client