[ncli] code refactor and functionality for notifications