Created Factory classes.
Using Factory classes. Some cleaning.