First commit by Troy

First commit by Troy.
Please read my comments in 'app.js'
Thx.