Added url creation code and sgd regression tests