Program is overhauled to eliminate as many errors as possible

Further critical errors were discovered in the official form so the program is overhauled so as to eliminate as many errors as possible.