Fixes #9. Fixes #8. Added typing alerts.