general API cleanup. Some doc.