Figured I could refactor some code that executed operations on a RichTextBox into extension methods.

Also renamed some variables.