Added a global resources manager (with unit test)