Code cleanup and minor fixes
Merge remote-tracking branch 'github/master'
Code cleanup and minor fixes