Finish modularising uidDiff (closes #1)