Refactoring -- Fragmented code into modules