Started on support for rendering as well as previewing