Fine-tuning the SGD class & redesigning the main function