add newline at the end of translated code, add indent to tail lines