Add hooks for updating gmail thread id (does it ever change?).
Mark some possibly dead code for removal
Apply labels by gmail id,
remove confirmed dead code,
add indexed data versioning