This should be a combination of @camerongose's branch and the latest 3.0.2 branch.