Some obvious problems in the earlier version fixed.