removes duplicated resources
moves paramaters out of the resources