Refactor for using dropbox API