Schema metadata refactor