move metadata to service

Only a pure move refactor