Refactored code
Updated README with simpler example code