Some serious changes to resource manager