md2-5, compress, logging, and memory update along with compatibility refactoring