Refactor

Vlad,

I made a small refactor to your awesome code. I also added a readme file explaining how to use the library.