Switched to using sub-shells when traversing sub-directories for all functions.