change: preflight function return values should be page-error and insertion-error.
change: should render template of target-uri before rendering the template of layout.