Re-based to another code example which actually works and is far simpler
to boot.