add application.js and update index and main files