Unit tests?

Also: unregister? "off", or make "on" return a handle with a dispose method, depending on convention vs ease...