Add forgotten ApplyUpdates; simplify code/queries