adding facility and hostname
indenting
adding env and remote support