Fix rcfile to use 'hosts' rather than 'host'.
Use iterator protocol correctly when gathering metadata.