Add some comments and const qualifiers.