Merge from master
Correcting various code quality issues