Trace

Still requires a few fixes, but the main part is done.
I guess clock also needs to be deleted.