Ripped out the API to a new file.