Updated sample to be more in line with Lin and Bilmes 2011, may not be correct -- can't compile at University.