A bunch of changes; most important is fixing problem in getlodM

Also working to speed up the vignette.