Fixes #158
Fixes #152
Fixes #157