Added comments and fixed spelling mistake.