TermWrite: move back/forward optimizations, buffering (hope everything works)