More refactoring. Support known_hosts.