Continued the work on refraction and also created a sync render method again to make debugging easier