fixed some deletion bugs
made rte prepend instead of append:
changed to prepending, sped up deletion by adding chain specification