splitting majiang.js file into several smaller files