Added lots of doctest