bunch of stuff that probably should have had separate PRs.