Refactored client threads to use static getAppContext() trick for retrieving globals outside of an activity without passing them in as an argument.