move api to init.lua
Remove dependencies