Const correctness for some new functions.