I've been wondering lately how evolution manages to produce complex organs. It is pretty obvious to me how evolution would select some minor traits like size, resistnce to illness or climate. There is a mutation where some organisms are slightly different and better traits are selected. However I cannot imagine how an organism will mutate to have lets say lungs at once and unless organism has a functional organ there is no reason for the trait to be selected. So how does evolution produce complx organs?
The best introduction to evolution of complex phenotypes via master control genes is Endless Forms Most Beautiful: The New Science of Evo Devo and the Making of the Animal Kingdom by Sean B. Carroll. You might also want to have a look at a more recent Evolutional developmental biology (Evo Devo) book like those you get when searching for "Evo Devo" in Google Books.
In summary, it is possible for a mutation to change a shape by changing the spatial distribution of a transcription factor during embryo development. What's more, by changing the distribution of two mutually dependent factors, formation of any shape is possible if the distributions overlap. Such transcription factors are highly conserved in evolution and the most important cause of the endless forms we see.