Small refactoring for the RNFEndpoint logic