Modulizing and optimizing MachineLearning module

Changing folder structure