Refactor m35.js