Moved code from zotnet/mts to mts/generic. Also, unified generic