Refactor monolithic codebase into modules to facilitate further grow.