Broke out the API-funcs into a separate file