Remove some annoying hacks, refactor app.js, debug Angular reply push