Add a better __getitem__ method.