Created by: muffato
This PR is a mixed bag of several unrelated changes. Let me know if you want me to break it down.