First version of resource manager class (wip)

One of the unit tests still fails