Previous pull requests merged and resolved

I realized that there would be some merge conflicts with all my pull requests so this would contain all of those, and also a bug I found. Sorry for the messiness.