Rearrange functions in api.py.