Refactor resources declaration.