See chapter 7 of the thesis. Link available under 'related resources'.