Add comments and tests for BasicBuffer