Finished main. Perplexities not correct after changing gt_discount a bit.