added remote db settings, fixed some issues