API changes for Buffer

Fixing the comparison function because it was not doing what it
was specified by the API. This lead to a rename of the function
to reflect what is going on.