Fixed multiple definitions of global variables in the app files.