Restructured the program to adhere to normal programming standards