wip: refactoring legacy layer
wip: metadata wrappers