Clean up types and doc.