started work on the card interface

a few other random bits too.