Issue #4
Fixes #21
Fixes #22