Clean up and expand api docs.