added ability to handle Index of objects. Fleshed out the tetsts better