added controller.js. still not finished.
Merge remote-tracking branch 'origin/chr' into chr