added return statements to show and new actions to stop code execution in the case of redirects.