a bunch of resharper fixes.