Finished implementing buffering. Closes #37