Added EM training.