added an option for the method cleanup and destroy refactored

Details Issue #116