Updated app to work with mongodb