Reduce the scope of a few variables
const correctness police