Added comments to solution.