Actualizing lib to support v3.
Merge pull request #6 from sunloverz/master

Actualizing lib to support v3.