Finished the new format style writing of txt files.
Various fixes prior to pypi release