Major overhaul of Translation algorithm and Document Tab Pane.