conditional expectation simplification 
On the right hand of the expression above, why could we move the condition  ' |X '   to the numerator without making any other changes?

If the value of $X$ is known, $X_i-\bar{X}$ and $(X_i-\bar{X})^2$ are known quantities, and so the only random variables that are unknown are the $U_i$.  More simply, remember that $E[Y\mid X]$ is a function of $X$, not of $Y$ as one might think, and $E[f(X)Y\mid X]$ equals $f(X)E[Y\mid X]$, which is also a function of $X$ and not of $Y$.
