Add function to walk out of modules