Remove hash when closing a method container again. Added small hash help...

...er functions.