Merge "Clean dirty state after uploading to server" into nyc-mr1-dev