Adding MainDisply.js, and refactor