bugfixes, "to top" button, interface improvements

Fixed bug with not restoring previous script structure after removing an
element and trying to revert action.