Agreed changes

1-  OrphanResource call method 
2- and some refactoring