Functionalized molecules studied by STM: motion, switching and reactivity