Pull bf4's changes into rab's fork