cleaned up dropbox connection code