initial version
use different trace handlers for this, win, type, self and selfns.
Therefor a lot of additional code and some fixes.
fixes for SF bug #187