Cleaned up some code to make Resharper happy.