Support both paths and direct function expressions in tsp module.
Lots of stuff.