Improving buffers, simplifying and removing unneeded code.