Improved variable naming and comments