Reorganised the program's structure to be more modular.