Make local variables const where possible