Mostly stylistic changes based on input by @bencorlett