Revise code for bad indentation and handle "backspace" in shell