Applied automatic code refactoring suggested by R#