Refactored code structure and test
Added more info in readme