Update app.js

Fix name lookup, load fragment if any is passed.