Several minor changes as dcapwell  mentioned