Switched to templates in order to make the resource manager more useful