Removed obsolete mess, added doctests