I now delete objects and lights properly.
I still can't use my own shaders.