Added case insensitivity to indexer and some minor changes
Merge of manish's code