App.js code refined