Move API helper to services folder in lib