CONNECT-294 Use backend API instead of direct access
CONNECT-294 Correct memory management