Update and fully merge this old code with my new code.

Make this code fully parrellel friendly by ensuring that the clone function creates deep copies,
 so the brenderer never needs to be hacked again like it is at the time of writing this.
 
This entire package is quite ugly.
Bryce should do better if he ever decides to implement this again.