remove echo when term is dumb; fix some indentation