Fixed formatting and added additional comments