Split out API functions.
Formatting.