Update issue 1

Update the algorithm. app.js does not initiate the code
main.js initiate the code and app.js works as list of settings