Fixed formatting, removed unneeded comments, and renamed variables for better readability