rough backspace support, this is getting too complex, needs unittests and refactor...
Merge branch 'master' into gh-pages