Fixing a whole bunch of formatting and bugs.  Still a lot to do.