On-Surface Synthesis of Organometallic and Carbon-Based Nanostructures in Ultrahigh Vacuum