General ReSharper refactoring suggestions, and added missing licenses.