Updated app to use postgresql