Thoroughly commented Fernandez_modules.nw