Removing unneccessary local variable declarations