Added resource management thingy.