Syntesis of Functionalised Pyrazolones and Imidazolines/Imidazoles through Divergent Cyclisation Reactions