Derivative of Exner function In chapter 13.1 in 'Mesoscale Meteorology in Midlatitudes' (Markowski and Richardson,2011) they use a Bernoulli equation and the hydrostatic equation and a lot of assumptions to derive an equation that predicts the height $z_{crit}$ at where an air parcel with an initial height of $z_0$ that is advected towards a barrier loses all horizontal velocity. In their argumentation they state the following identity
$$\dfrac{\partial p}{\partial z}(x,z) = \rho(x,z)c_p\theta(x,z)\dfrac{\partial \pi}{\partial z} (x,z)\tag{1}\label{wanted}$$
where $\pi(x,z)=\left(\frac{p(x,z)}{p_0}\right)^{\frac{R}{c_p}}$ is the Exner function with reference pressure $p_0\in\mathbb{R}_+$ constant, $p$ is pressure, $\theta$ is potential temperature, $\rho$ is density, and $c_p$ and $R$ are constant $\in \mathbb{R}_+$. 

If I try to derive this equation by taking the partial derivative of $\pi$ with respect to height $z$ and use the identity $\pi(x,z)=\frac{T(x,z)}{\theta(x,z)}$ as can be found for example on wikipedia ($T$ is temperature), then I end up with (suppressing arguments $x$ and $z$ in favour of readability)
$$\dfrac{\partial \pi}{\partial z} =  \left(\frac{1}{p_0}\right)^{\frac{R}{c_p}}\dfrac{\partial}{\partial z}\exp\left(\frac{R}{c_p}\log(p)\right)=\left(\frac{1}{p_0}\right)^{\frac{R}{c_p}}* \frac{T}{\theta}*{\frac{R}{c_p}}*\frac{1}{p}*\dfrac{\partial p}{\partial z}.$$
Multiplying this by $\rho c_p\theta$ we get 
$$\rho c_p \theta \dfrac{\partial \pi}{\partial z} = \left(\frac{1}{p_0}\right)^{\frac{R}{c_p}} \frac{T R \rho}{p}*\dfrac{\partial p}{\partial z}$$
and because $\frac{T R \rho}{p}=1$ by the ideal gas law we end up with 
$$\rho c_p \theta \dfrac{\partial \pi}{\partial z} = \left(\frac{1}{p_0}\right)^{\frac{R}{c_p}}\dfrac{\partial p}{\partial z}.$$
This is almost what is stated in $\eqref{wanted}$, but not quite and I do not know how to get rid of the factor $\left(\frac{1}{p_0}\right)^{\frac{R}{c_p}}$ resp. do not see why it remains unmentioned in the textbook. Any help is appreciated.
Start with the original equation. Let's first write the Hydrostatic equation: 

$$\frac{\partial p}{\partial z}=-\rho g$$

So let's prove that $$-g=c_p\theta\frac{\partial \pi}{\partial z}$$

If we use the product rule, we observe $$-g=c_p(\frac{\partial \theta \pi}{\partial z}-\pi\frac{\partial \theta}{\partial z})$$

Since $\pi=\frac{T}{\theta}$, we can say that $T=\pi\theta$, which makes the above equation

$$-g=c_p(\frac{\partial T}{\partial z}-\pi\frac{\partial \theta}{\partial z})$$

It can be shown that
$$\frac{\partial \theta}{\partial z}=\frac{\theta}{T}(\frac{\partial T}{\partial z}+\frac{g}{c_p})$$

which can be rewritten as
$$\frac{\partial \theta}{\partial z}=\frac{1}{\pi}(\frac{\partial T}{\partial z}+\frac{g}{c_p})$$

Substituting this into my fourth equation
$$-g=c_p(\frac{\partial T}{\partial z}-\frac{\pi}{\pi}(\frac{\partial T}{\partial z}+\frac{g}{c_p}))$$

From here I think you can figure it out. 

Derivation for $\frac{\partial \theta}{\partial z}$
$$\theta=T(\frac{p_0}{p})^\frac{R_d}{c_p}$$
$$log(\theta)=log(T)+\frac{R_d}{c_p}(log(p_0)-log(p))$$
$$ \frac{1}{\theta}\frac{\partial \theta}{\partial z}=\frac{1}{T}\frac{\partial T}{\partial z}-\frac{R_d}{c_p P}\frac{\partial P}{\partial z}$$
Utilizing hydrostatic equation
$$ \frac{1}{\theta}\frac{\partial \theta}{\partial z}=\frac{1}{T}\frac{\partial T}{\partial z}+\frac{R_d \rho g}{c_p P}$$
$$ \frac{1}{\theta}\frac{\partial \theta}{\partial z}=\frac{1}{T}\frac{\partial T}{\partial z}+\frac{g}{c_p T}$$

$$ \frac{\partial \theta}{\partial z}=\frac{\theta}{T}(\frac{\partial T}{\partial z}+\frac{g}{c_p })$$