code cleanup

fixed roughly 200 R#/Stylecop issues