Improve code conversion