move rendering into specialized File and Template rendering classes.