2013 09 29 html export

Added an html table exporter and fixed assorted bugs.  This is a commit on top of 7a4800e7ddd4290de409ba77ea563123ebbf6d1 which has a separate pull request.