Ajax form refactoring.