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

Since you're calling stuff on the class, it might make sense to just make this a class method.