Add ConfigForm and refactor.