Split the Id related functions out from Var into Id, document Var and some of Id