Improved doc, and some minor changes