CMem rewrite done!