More const correctness and silence compiler warnings.