Updated switch handling and passing SHELL.
Removed now redundant SHELL check in child.