Adding debug ns; updating logger function; minor updates