Add indexes and associations to models