Rebuilding form so back/forward buttons work properly, more edge case handling.