Add timestamps to unit add/remove & base classes for xml metadata generation

and actually, if there isn't, it might make more sense to put this function there.