Add tests and make deletebackwardword more consistent