Revert "Converted IMs to the new input format"

This reverts commit 0920fc829021bf1a52b19e4ed12c77309a2fb499.
Better IM conversion, this time localizing changes to the convert function