Letrec optimization and interpreter cleanup