MemTools testing

See the commit descriptions for details.