Removed unnessecary looping to improve speed of resources page.