refactor code resources module