Adding procedural fallback, cleaning up the API.