continue refactoring, more removing metadata layer