Remove some global state.
Enable re-reading of configuration without restart.

Closes #3.