Some quick improvements

If you want one or more commits not to be merged in, I can update this PR. Just let me know the commit hash(es) you don't want in.