Rearranged the flow of the program.