WIP: Clean up mode character handling.