added flag (DISABLE_FOREGROUND_RUNCTIONS) which disables foreground functionality to save memory