Apply const to some functions

Signifies that they don't modify the object's internal state.