Refactored the code.
Updated readme.