Changed the structure of the program.