Cleaned up with resharper.