Trainer code fixed and tested.  Changes in NEWS file.