Add and improve documentation.