pass in the app context to invalidate()
declare class alias
Merge pull request #2286 from rossriley/fix-app-scope

Fix app scope