Changed resource handling
Changed resource handling
Changed access to Smarty object