Enabled StyleCop and fixed related errors