Functionalization of Carbon Nanotubes with Molecular Switches