streamlined badges function, minor changes to training function