o Migrate mx functions to work on the new couchdb structure and views. Fixes #3502.