change application to namespace and connection_manager to singleton