little refactoring, and message level changes
fixing conflicts
fix jslint errors
merge with origin/master