Misc. fixes and formatting clean-up

replacement PR for  #7917 
exists > exist (may be elsewhere too)