Move API to lib/API