Conversion was performed (without manual fixup) using: https://gist.github.com/nikic/98357b71fd67756b0f064c9517b62a34