Added __len__ and updated doc/comments