Clean up attributes and set initial_hosts