fixing NodeBasic sample on mac/ios and minor cleanup