Added SGD and a couple more functions for data.