major rewrite of table processing, cleaned up, added readme