Couldn't the line below be a method, call apply_directory_settings(t)