some outdated changes to the buffer code pushing to switch branches, most of this code will be reworked in the coming days anyway