Add function to retrieve Parameter index.
Base Trace class on Parameter index instead of pointer.
Reimplement tracing, fix numerous bugs.