cleanup of debug boxes in Dropbox workflow, minor cleanup and
reordering of functions in state controller