Reorganized the form and the code.