Incorporate HAMT into meme.c; delete old BPT.
Various fixes and improvements.