Moved API into library
Merge pull request #1 from maxpow4h/master

Moved API into library