Merge "Clean up some database domain ID related code and fix some comments"