ReSharper sweep, fixing minor code issues identified by ReSharper.