First draft of the patch, along with some samples