Fixes #5
Fixes #3
Fixes #17