reorganizing this code
Reorganized the program directory and cleaned it up.