Added structab_cat; totally revamped text and SQL data dumping