We present a detailed first principles study of Fe-pnictides with particular emphasis on competing magnetic interactions, structural phase transition, giant magneto-elastic coupling and its effect on phonons. The exchange interactions $J_{i,j}(R)$ are calculated up to $approx 12 $AA $. We find that $J_{i,j}(R)$ has an oscillatory character with an envelop decaying as $1/R^3$ along the stripe-direction while it is very short range along the diagonal direction and antiferromagnetic. A brief discussion of the neutron scattering determination of these exchange constants from a single crystal sample with orthorhombic twinning is given. The lattice parameter dependence of the exchange constants, $dJ_{i,j}/da$ are calculated for a simple spin-Peierls like model to explain the fine details of the tetragonal-orthorhombic phase transition. We then discuss giant magneto-elastic effects in these systems. We show that when the Fe-spin is turned off the optimized c-values are shorter than experimetnal values by 1.4 AA $ $ for CaFe$_2$As$_2$, by 0.4 AA $ $ for BaFe$_2$As$_2$, and by 0.13 AA $ $ for LaOFeAs. Finally, we show that Fe-spin is also required to obtain the right phonon energies, in particular As c-polarized and Fe-Fe in-plane modes. Since treating iron as magnetic ion always gives much better results than non-magnetic ones and since there is no large c-axis reduction during the normal to superconducting phase transition, the iron magnetic moment should be present in Fe-pnictides at all times. We discuss the implications of our results on the mechanism of superconductivity in these fascinating Fe-pnictide systems.