Rewritten load resources functions.