Implemented deleteAll() for more resources, resource caching and fixed
some bugs.