Extracting classes

Now it's good