several small changes

view the commits for details
feel free to cherry-pick single commits, if there are doubts about the others