Added indexes to id fields