Switch turns on undo.
Minor code formatting.