theapp.js: add header and redraw