Reorganized our editor component's code to make it more logical.