Small fixups and commenting on most code.