Updated README
Refactored and added unit tests