Extract text manipulation functions from SessionController

Following the behaviour introduced with DirectTextStyler and friends, this pulls the text manipulation methods out of the SessionController.