Added nand table.  Fixed a bunch of input.