added subscription types and fromjson instances, refactored card and token