make db reloading require a reason; decrease nesting depth of conditionals