added in mathic library, changes to memtailor too.  Not functional yet
merged with Dan changes