Refactor res directory structure