Added command line optiosn to control index.