update with Marks recent fixes
note the packages that this needs.
Make it run under X
add an option to pass in a card uid, useful if you don't have a card reader and want to do some debugging