Se api

Just for preview. Please don't merge it.
I would have preferred having a tee_se_ prefix to these functions. What does others think?