add comments to app.js
refactor the patcher out of the headless terminal.
more useful log
style change and color tweak
optimize the bandwidth a bit