Added external db support
Fixed testing install
Added remote env db