Copied in changes from all these other folks on github