improved environment name and const correctness