Fixed db connectivity code.
Added heroku port as default for app.