Minor improvements

Let me know if you want me to modify any of the patches and I'll update the PR.