Resources refactor