Change host and environment handling:

 - Environment must be defined.
 - Environment need not have any hosts, but this is a warning.
 - Hosts, if defined, must be in the environment.