Lots of merges and enhancements

I tried to merge in just about every outstanding fork, but gave up on @jcdarwin cuz he just refactored the entire engine and I don't have _THAT_ much energy.

Also, although I merged @dnakov in also, I didn't keep the changes from 4dae463d7641ccb42bc9c7d10db492561493d880 because I am not sure if I trust them. I would be curious to know more about this bug before re-applying it