Moved conversion from an external extension to an internal one.