Revert "Merge pull request #48 from simonwex/app-context"

This reverts commit 3715e9eb7466948738eff87cbe45440d5cc3ee10, reversing
changes made to 7132c90e34feade1f67209741bf8f502f06f0c44.