Optimization of a NOx Gas Sensor based on Single Walled Carbon Nanotubes