Convert hmms.js to hmms.coffee