Merge back from develop3d

I've got a bad feeling about this.