Amortization refactor

Refactoring .

1.Updated Method signatures
2.Improved comments 
3.Added more testcases
4.Updated Readme 
5.Updated pacakges