Added general support for the fox:conversion-mode inside the new IF. Cleaned up usage of fox:conversion-mode foreign attribute. Plus additional cleanup.