even more comments and a new method in the resource manager to unload all unused resources