Better way to handle rendering