More tweaks to gradient ascent - need a termination code.