Reorganize metadata storage mechanism to take advantage of new functions