resource generator refactor