Implemented the passing of environments to modules. closes #7