Cleanup code. Fix StyleCop warnings.