Various tweaks

Thanks for your work on the extension! I'm finding this very useful.

Feel free to browse my commits and pull them in if you'd like (or not -- up to you). I've tried to leave fairly detailed notes in the commit logs and code comments.