Updated beam render code