renamed app.js to index.js. refactored moduleexport of messenger