Refactor resources