Functionalized carbon nanotubes and device applications