Attempted (incomplete) update to 1.4

It's not bug-free yet, I suspect some work needs to be done on SignPatch, will add to this pull request when I fix it.