Fix doctests and extests