Fixes #18
Fixes #17
Fixes #6