Improvements to shell command execution