Fix issues related to variable naming and constant checking