Made the interface work, added methods to facilitate res_add_cc and res_purchase_cc, added tests