Add more indexes, fix scripts