Checks refs match ids
Polishes conditions for min/max questions
Ids are now checked for ambiguity