Loop over conf instead of addResource
Refactor