Removed async and wait calls to make .NET 4.0 compatible and synchronous.