Updated render loop