Working on resource manager and fixed bug with setting cache headers