Improve `_exec` and its test coverage

This is a single `_exec` for use by all browsers.