Fixed FxCop warnings and typos.