Clean up API, polish documentation