There were some bits that were wrong, which were found when I started writing tests for the problems.
Attach a file by drag & drop or click to upload