Refactor Dropbox adapter