Some refactorings

Please, review #35 first as this branch builds on the other.

This PR consists of only loosely related commits, most of them only propositions. We should cherry-pick, what we agree on.
Sorry, I should have been clearer. I'm in favor of no warnings showing up when we compile. `fno-warn-name-shadowing` is fine by me (at the file or cabal level).