Added onedimensional minimization.