Improved variable names and updated comments for better clarity of example