Cleaned up resharper warnings