Fixing compile error and adding docs
Merge pull request #78 from ankurp/refactor

Fixing compile error and adding docs