Update, refactor and adds API v1.
Merge pull request #3 from mayatron/wip

Update, refactor and adds API v1.