Refactor to better support multiple destinations.