Agreed changes

1-  OrphanResource call method 
2- and some refactoring
this is a great addition