Updated app1 to use member assignment and function literals.

Signed-off-by: Jakob Brandsborg Ehmsen <jakobehmsen.github@gmail.com>