Modularize the documentation, fix a lot of doc warnings, etc.