Add card hash creation.
Add metadata support.
Code cleanup.