some standard estimates in Yitang Zhang's paper I'm trying to understand Zhang's paper on prime gaps, but I can't figure out some "standard" estimates for which Zhang omitted details. As a layman in analytic number theory, I really need some hints (or reference) for understanding those standard estimates I'm listing below.


*

*On page 9, it is said that we can "apply some standard estimates to deduce that"  $$A_1(d)=\frac{1}{2\pi i}\int_{|s|=1/L} \text{(something)} \, ds + O(L^{-A}).$$ 
I know that $A_1(d)$ equals an integral along the line $Re(s)=1/L$, but how to compare it with the integral along the circle $|s|=1/L$ ?

*Still on page 9, it is said that "If $|s|\le 1/L$ , then $\theta_1(d, s)\ll (\log L)^B$ ." Why is this true?
Thanks a lot.
 A: 1.
By shifting the line of integration from positive to negative half complex plane, one encloses the pole $s=0$ by a rectangle. This gives rise to a residue, two horizontal line integrals, and one vertical line integral. One then estimate the three line integrals and see that they are acceptable error terms. The main term is the residue, which is recovered by the integral along the circle $|s|=1/L$.
2.
The no. of prime factors of $d$ is
$=\sum_{p|d}1\leq\sum_{p\leq\log x}1+\sum_{p|d, p>\log x}1$. The first sum is $\ll \frac{\log x}{\log\log x}$ by prime number theorem. The second sum counts the number $m$ of prime factor of $d$ which is greater than $\log x$. Since $(\log x)^{m}\!=\!d \Rightarrow m=\frac{\log d}{\log \log x}$, we see that the second sum is again $\ll \frac{\log x}{\log \log x}$. 
Thus $d$ has $\ll \frac{\log x}{\log \log x}$ no. of prime factors. 
Therefore,
$\prod_{p|d}(1-\frac{v_p}{p^{1+s}})^{-1} = \prod_{p|d}(1+\frac{v_p}{p^{1+s}-v_p})$
$\ll \prod_{p\ll\log x}(1+\frac{v_p}{|p^{1+s}|-v_p})$, where in the last step we apply the prime number theorem.
When $p_0<p\ll\log x$, each factor in the product is $\ll(1+\frac{k_0}{p^{1-1/L}-k_0})$.
Since $1\leq p^{1/L}=e^{\log p/L}\ll 1$, each factor is $\ll(1+\frac{B}{p})\ll(1+\frac{1}{p})^B$.
Hence $\theta_1(d,s)$ 
$\ll \prod_{p\ll\log x}(1+\frac{1}{p})^{B}$.
We have 
$\prod_{p<y}(1+\frac{1}{p})\ll \log y$ by Mertens' formula, so above is $\ll (\log\log x)^B=(\log L)^B$, which was to be demonstrated. 
