Minor cleanup of Publish code and tests