More refactor. Trying to make modules more modular