Updated the code for painting frames and lighting