Some Improvements

- Added documentation
- Unit test using pyTest
- Generalization of some functions