Fix examples in code comments and small code cosmetic fixes