Merged v1.6569-multi-db (which is actually modularization stuff)