Eliminated need for "app" variable in Example 2
Programmatically determine the "baseUrl" in Example 2
Merge pull request #28 from lukehorvat/master

Simplified code in Example 2