Changes to support remote db