Adding some structure to the code in nrf...