Big refactoring for Dropbox