Moved shell actions to their own functions