More const correctness and pass-by-ref