Added update of page_lines after text changes.
Various small changes getting it to work with mml_edit.