- fixed clearResources method
 * now working as expected (cancel deferred, delete resource)
 * added clearResources method to wrapper custom element

- started improving error handling , with custom error names
for more clarity