Clean up and specialize API.