Refactoring of the code

Solved error with some scrapping classes
Refactoring of the code