Updated $MEM checks, and version