De-duplicate code
Forgot to remove app variable