Updating to newest version of toSource

I was having issues from time to time that were resolved with marcello3d's newest toSource code.