reorganized classes into different files and created Scala Test's for SGD