Fixes #1
Fixes #3
Revert "Fixes #3"

This reverts commit bae123b420606a9e04d95014845cf28736750575.
Fixes #3
Fixes #2
Various tweaks