Pulled from Dscanner trunk.
Extracted inspect code into its own module.
Made it work with function parameters.