Use a panel instead of drawing in the text%

This greatly simplifies the code for the mode
indicator and avoids clipping issues.
Delete trailing whitespace
Start adding support for ex commands