Beta 4 compatibility

This includes @drmohundro's work for beta 4 compatibility.