Added indexes and constraints