Document and improve reference API. #127