Refactored PublishOverFTP/CIF and added comments