Figure 7: Smart gateway for preprocessing.