Added Dropbox preference

Fixes #10. Also refactored dropbox code