cleanup program structure, fix dropbox bug