Refactor the code to more modular...