Added mdsol.ajax

Enclosed core sub-modules in IIFEs, other misc cleanup