Fixed the worst problems. But there is still something wrong with the conversion.