Move all the decorators and the memory dumper to the util.py module.