Modify consistency check, add variable dependencies