Added rudimentary buffer functionality