Added import Exception.
Fixed type errors.
Commented out outdated examples.