Moved the implementation of Module class into structure.py.