Working out code removed - see scratchpad repo