Changed window.app.* to app.* to match the example code.

Changed window.app.* to app.* to match the example code.
removed more 'window.' prefixes for consistency
Merge pull request #439 from dwabyick/gh-pages

Changed window.app.* to app.* to match the example code in Example 1