Fix formatting
Remove confusing sample code
Improve fixes
Merge pull request #3251 from bicpi/mini_fixes

Mini fixes