Better deletion code and more tests
No need to pass __name__ and __file__
refactor

refactor function specific code out of shared implementation
More refactoring

All common code is now all in one place