Refactoring of modules #115 in progress