Structure Formation And The End Of The Cosmic Dark Ages