Minor refactoring of the modules. Much cleaner. But needs work.