Move to its own file.

Signed-off-by: Chris Lamb <chris@chris-lamb.co.uk>
Thread todo

Signed-off-by: Chris Lamb <chris@chris-lamb.co.uk>