almost finished TrainData class; moved most of train data-related inner functions there. started refactoring of nbayes