removing redundant code from Module.py