Little changes

ClassLoader is not longer static
Init Smarty first and than the ClassLoader to prevend class load errors
Add Resource function

Add resource function for smarty ({res}in_template_path{/res})