Final procedural solution with the connection details managed by the app rather than the library