Major refactoring of the publishing method, now uses helper indexFile(s). #108