Big overhaul

Still not sure what was causing you trouble, but did some changes both to code and to dev scaffolding. [NEWS](https://github.com/jlehtoma/cites/blob/master/NEWS.md) should give you an idea what has changed, as will of course the commits. I understand that many of the changes are a very opinionated way of doing things and feel free to comment if something is not clear. The git commit history is also a bit messy + this pull request could maybe have broken into several smaller ones. Still learning these things...