richMode: rework backspace handler.
test: rework spacebar tests.

This exposed a couple issues; these have now been fixed.
test: rework backspace tests

Some freshly exposed bugs have now been fixed.
test: rework enter tests.

A number of issues have now been addressed. Fixes #49.