Moved functions to shell_functions file