Further refactor for utilities and move resources to top level