Code refactor/cleanup

- Code refactor to promote DRY principle
- Code cleanup accordingly to PEP8
- README corrections and cleanup