toggle interval split into toggle delays.
bug fixed for backspace in toggle mode.
code re-factored.