Fixed variable names and formatting