index and tyding up stuff