Make the API a module, for reusability and caching