Corrected misplaced docstrings and type hints (found by eastwood).