Resource classes refactor