streamline script.class and template.class