Refactor cards so that API card extends a base Card.

Change-Id: I0ad0e3750998625e318cbb74d67180d6c8cab93e