Added reference counting for Rope nodes, fixed memory management bugs.