First Restructure

Restructured the program, however I created several bugs in the process.