const correctness improvements