broken commit, refactoring img/tex/rbuf