Move moment logic to mentat.js