Methods last, count and index added with some tests