Added comments and solutions.