Updated StyleCop settings and started refactoring