Code cleanup based on pull review

They say I've fixed up 159 issues.