Numerous small changes in doc, interface, tests