clean up the nrf code and api