Started integrating code into nbv