eval to mem + memory manager fixes