Amortization refactor

Descrption: 

1. Re-factoring code, updating code-base structure to meet basic object-oriented standards.
2. Adding Test cases .
3. Updating .gitignore with more ignore dirs