code and readme fixups