Updated variable names and comments