Improve FileInterface, flatten functions with immediate simple LetDefs