merging jasons latest, fixing a few examples