Synced minor changes from modularized v1.6569-mult-db-wip branch