Improve `_exec` and its test coverage

Does this look better @winhamwr ?