Functional neurosurgery and pain management