Config improvements & fixes

Fixes #308.
Fixes #292.
Fixes #220.
Fixes #313.