Restructure main program #11