cleaned up slug_mem.c