I've added some major functionality in the area of the error function.
I'm not even sure what's happening at this point. Merging is hard, and doesn't seem to be very much fun. I suppose it's a valuable skill. Just in case, I've copy/pasted my work.