refactored dropbox state/fixed record deletion