Only load the required function in generate_source and generate_destination.