Clean up converter logic a bit.