Improved remove cleanup, added tests, updated gedi