Added API definitions to peek at head and tail.