Fixes for resources, templates and js