trim whitespace; add option for moving cursor bwd over whitespace