Refactoring the data science solution