Fixed an error in adagrad -- was taking sgrt of the wrong vector and
better formatting