How this was done

See changes for details