Fix type soundness
Fix inference soundness
Translator fixes
Fix compiler