Eliminated need for "app" variable in Example 2
Programmatically determine the "baseUrl" in Example 2