Modularity of regular and treelike graphs. (7th October 2017)