Memory management tools fixed and passing basic tests