Remove various metadata nonsense which is either completely unused or only used from tests

@thieman