Refactoring.

The message edit text has been made into its own widget class.