Code cleanup, following Resharper advice.