Fix warnings
Fix doctests