Comment improvements, plus some minor code fixes

Change-Id: Ic3926e3529589feaf67eb0b51f2da0aec578ff80