add api
 move api to static
 remove old api
Merge pull request #48 from leplay/master

api