Fixed doctests and import errors