First pass at more intelligent form hijax. Refactor still needed.