Smart Backspace mode added

Added a smart backspace mode: erase only characters that need to be erased