Removed unused lines.
Update the calculation of difference. close #90