updates+fixes+improvements

updates from varun source
fixes from dragonpt source
improvements from dragonpt source
fixes+improvements

improvements from dragonpt source
Merge branch 'master' of https://github.com/lingfude/Newman-N1