remove lots of old code!
begin metadata migration. still need to adapt old client code