Modify trace api

@mortenvp I finished the unit tests and fixed the todos as good as i could. Please let me know what you think? :)
This comment seems to be a left-over from the previous code, so I think we should remove it.