Some improvements, questions and fixes

This PR contains a number of issues. Please feel free to comment what I should remove, I will make a PR which contains only the things you accept as contributions, so you do not need to hand-merge them.
See the JWS proposal in #23, no need for a comment