Refactored all resources thread