Some refactoring. To play with ReSharper a bit