Fix SGD result and some more style fixes