Refactor

Apologies if this is a bit obnoxious, but I couldn't help taking out the unneeded explicit `return` statements. Also added a couple other syntax tweaks that make the code slightly DRYer and more straightforward (at least to my eyes).