move madras.js to own file