fix "apps undeclared" error (missing let in local var declation)

thanks to the new cleanup and "use strict" directive, we've found a silent problem:
apps wasn't declared in this assignments.