Restructured the program quite a bit.