MT: conversion to CouchDB, conversion to coffeescript