Synthesis on templates: The chemical simulation of the ATP-imidazole cycle (II) Competing pathways in template synthesis: Alkali mediated ring-ring transformations in 4-quinazolones