Add expiremental change for adding markText to history
Clean up formatText
modifications to addundoState (still deactivated)