Added comments and fixed identations.