Pull request for the patches I consider stable

For details, see the mail.