make app/index.js more concise