__doc__ switch, make importable, and easy to test