Added wrapIndex() function to wrap around indices, added __str__ method