minor code clean up and added trainTillConvergence on logistic regression