Extracts

Hi Dan,

I've done very little, other than make some changes to make it easier to understand how it works.