Added code to interact with selection text.  May break with Lucy's update.