Add Doctest

Doctest examples extracted from README