initial changes to support mongodb separation and downloading metadata