Add unit tests

This comment should talk about "buffers" vs. "typed arrays"