Add re-worked form builder code, partly completed